<?php

/**
 * @author PeoneEr
 */
require_once "core/db.php";

class Mchangegender1 extends DB {

    private $_query;
    private $_fetch = array();

    protected function getGender($nick) {
        /**
         *  текущий пол чара
         * @param string $login
         * @param string $nick
         * @return $gender
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT `gender` FROM `players` WHERE `name` = '$nick'";
        $this->_fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        return $this->_fetch['gender'];
        DB::getInstance()->closeConnection();
        unset($this->_query, $this->_fetch);
    }

}

?>
